package com.kuaimacode.kframework.api.controller.agent;

import com.kuaimacode.kframework.api.controller.BaseController;
import com.kuaimacode.kframework.api.service.category.AgentServService;
import com.kuaimacode.kframework.common.JsonResult;
import com.kuaimacode.kframework.mybatis.models.category.AgentServ;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Administrator
 * @date 2019/03/22
 */
@RestController
@RequestMapping("/category/service")
@Api(tags = "物品种类",description = "上门服务服务品类相关api")
public class AgentServController extends BaseController {

    @Autowired
    private AgentServService agentServService;

    @ApiOperation(value = "根据服务品类查询服务相关信息", notes="根据服务品类查询服务相关信息，描述价格等，当前地区未设置取默认设置")
    @GetMapping("/getByChildTypeId/{id}")
    @ApiImplicitParam(name = "id", value = "childTypeId", required = true, dataType = "string",paramType = "path")
    public JsonResult<AgentServ> getByServiceId(@PathVariable String id, HttpServletRequest request){

        AgentServ agentService = agentServService.getById(id);
        return JsonResult.success(agentService);
    }


}
